package com.itrus.util;

import java.io.File;
import java.io.PrintStream;

public class SystemUtils
{
  public static final String AWT_TOOLKIT = getSystemProperty("awt.toolkit");
  public static final String FILE_ENCODING = getSystemProperty("file.encoding");
  public static final String FILE_SEPARATOR = getSystemProperty("file.separator");
  public static final boolean IS_JAVA_1_1 = false;
  public static final boolean IS_JAVA_1_2 = false;
  public static final boolean IS_JAVA_1_3 = false;
  public static final boolean IS_JAVA_1_4 = false;
  public static final boolean IS_JAVA_1_5 = false;
  public static final boolean IS_OS_AIX = false;
  public static final boolean IS_OS_HP_UX = false;
  public static final boolean IS_OS_IRIX = false;
  public static final boolean IS_OS_LINUX = false;
  public static final boolean IS_OS_MAC = false;
  public static final boolean IS_OS_MAC_OSX = false;
  public static final boolean IS_OS_OS2 = false;
  public static final boolean IS_OS_SOLARIS = false;
  public static final boolean IS_OS_SUN_OS = false;
  public static final boolean IS_OS_UNIX = false;
  public static final boolean IS_OS_WINDOWS = false;
  public static final boolean IS_OS_WINDOWS_2000 = false;
  public static final boolean IS_OS_WINDOWS_95 = false;
  public static final boolean IS_OS_WINDOWS_98 = false;
  public static final boolean IS_OS_WINDOWS_ME = false;
  public static final boolean IS_OS_WINDOWS_NT = false;
  public static final boolean IS_OS_WINDOWS_XP = false;
  public static final String JAVA_AWT_FONTS = getSystemProperty("java.awt.fonts");
  public static final String JAVA_AWT_GRAPHICSENV = getSystemProperty("java.awt.graphicsenv");
  public static final String JAVA_AWT_HEADLESS = getSystemProperty("java.awt.headless");
  public static final String JAVA_AWT_PRINTERJOB = getSystemProperty("java.awt.printerjob");
  public static final String JAVA_CLASS_PATH = getSystemProperty("java.class.path");
  public static final String JAVA_CLASS_VERSION = getSystemProperty("java.class.version");
  public static final String JAVA_COMPILER = getSystemProperty("java.compiler");
  public static final String JAVA_ENDORSED_DIRS = getSystemProperty("java.endorsed.dirs");
  public static final String JAVA_EXT_DIRS = getSystemProperty("java.ext.dirs");
  public static final String JAVA_HOME = getSystemProperty("java.home");
  private static final String JAVA_HOME_KEY = "java.home";
  public static final String JAVA_IO_TMPDIR = getSystemProperty("java.io.tmpdir");
  private static final String JAVA_IO_TMPDIR_KEY = "java.io.tmpdir";
  public static final String JAVA_LIBRARY_PATH = getSystemProperty("java.library.path");
  public static final String JAVA_RUNTIME_NAME = getSystemProperty("java.runtime.name");
  public static final String JAVA_RUNTIME_VERSION = getSystemProperty("java.runtime.version");
  public static final String JAVA_SPECIFICATION_NAME = getSystemProperty("java.specification.name");
  public static final String JAVA_SPECIFICATION_VENDOR = getSystemProperty("java.specification.vendor");
  public static final String JAVA_SPECIFICATION_VERSION = getSystemProperty("java.specification.version");
  public static final String JAVA_UTIL_PREFS_PREFERENCES_FACTORY = getSystemProperty("java.util.prefs.PreferencesFactory");
  public static final String JAVA_VENDOR = getSystemProperty("java.vendor");
  public static final String JAVA_VENDOR_URL = getSystemProperty("java.vendor.url");
  public static final String JAVA_VERSION = getSystemProperty("java.version");
  public static final float JAVA_VERSION_FLOAT = 0.0F;
  public static final int JAVA_VERSION_INT = 0;
  public static final String JAVA_VERSION_TRIMMED;
  public static final String JAVA_VM_INFO = getSystemProperty("java.vm.info");
  public static final String JAVA_VM_NAME = getSystemProperty("java.vm.name");
  public static final String JAVA_VM_SPECIFICATION_NAME = getSystemProperty("java.vm.specification.name");
  public static final String JAVA_VM_SPECIFICATION_VENDOR = getSystemProperty("java.vm.specification.vendor");
  public static final String JAVA_VM_SPECIFICATION_VERSION = getSystemProperty("java.vm.specification.version");
  public static final String JAVA_VM_VENDOR = getSystemProperty("java.vm.vendor");
  public static final String JAVA_VM_VERSION = getSystemProperty("java.vm.version");
  public static final String LINE_SEPARATOR = getSystemProperty("line.separator");
  public static final String OS_ARCH = getSystemProperty("os.arch");
  public static final String OS_NAME = getSystemProperty("os.name");
  private static final String OS_NAME_WINDOWS_PREFIX = "Windows";
  public static final String OS_VERSION = getSystemProperty("os.version");
  public static final String PATH_SEPARATOR = getSystemProperty("path.separator");
  public static final String USER_COUNTRY;
  public static final String USER_DIR;
  private static final String USER_DIR_KEY = "user.dir";
  public static final String USER_HOME;
  private static final String USER_HOME_KEY = "user.home";
  public static final String USER_LANGUAGE;
  public static final String USER_NAME;
  public static final String USER_TIMEZONE;

  static
  {
    String str;
    boolean bool1;
    label457: boolean bool2;
    if (getSystemProperty("user.country") == null)
    {
      str = getSystemProperty("user.region");
      USER_COUNTRY = str;
      USER_DIR = getSystemProperty("user.dir");
      USER_HOME = getSystemProperty("user.home");
      USER_LANGUAGE = getSystemProperty("user.language");
      USER_NAME = getSystemProperty("user.name");
      USER_TIMEZONE = getSystemProperty("user.timezone");
      JAVA_VERSION_TRIMMED = getJavaVersionTrimmed();
      JAVA_VERSION_FLOAT = getJavaVersionAsFloat();
      JAVA_VERSION_INT = getJavaVersionAsInt();
      IS_JAVA_1_1 = getJavaVersionMatches("1.1");
      IS_JAVA_1_2 = getJavaVersionMatches("1.2");
      IS_JAVA_1_3 = getJavaVersionMatches("1.3");
      IS_JAVA_1_4 = getJavaVersionMatches("1.4");
      IS_JAVA_1_5 = getJavaVersionMatches("1.5");
      IS_OS_AIX = getOSMatches("AIX");
      IS_OS_HP_UX = getOSMatches("HP-UX");
      IS_OS_IRIX = getOSMatches("Irix");
      if ((getOSMatches("Linux")) || (getOSMatches("LINUX")))
        break label640;
      bool1 = false;
      IS_OS_LINUX = bool1;
      IS_OS_MAC = getOSMatches("Mac");
      IS_OS_MAC_OSX = getOSMatches("Mac OS X");
      IS_OS_OS2 = getOSMatches("OS/2");
      IS_OS_SOLARIS = getOSMatches("Solaris");
      IS_OS_SUN_OS = getOSMatches("SunOS");
      if ((IS_OS_AIX) || (IS_OS_HP_UX) || (IS_OS_IRIX) || (IS_OS_LINUX) || (IS_OS_MAC_OSX) || (IS_OS_SOLARIS))
        break label645;
      boolean bool3 = IS_OS_SUN_OS;
      bool2 = false;
      if (bool3)
        break label645;
    }
    while (true)
    {
      IS_OS_UNIX = bool2;
      IS_OS_WINDOWS = getOSMatches("Windows");
      IS_OS_WINDOWS_2000 = getOSMatches("Windows", "5.0");
      IS_OS_WINDOWS_95 = getOSMatches("Windows 9", "4.0");
      IS_OS_WINDOWS_98 = getOSMatches("Windows 9", "4.1");
      IS_OS_WINDOWS_ME = getOSMatches("Windows", "4.9");
      IS_OS_WINDOWS_NT = getOSMatches("Windows NT");
      IS_OS_WINDOWS_XP = getOSMatches("Windows", "5.1");
      return;
      str = getSystemProperty("user.country");
      break;
      label640: bool1 = true;
      break label457;
      label645: bool2 = true;
    }
  }

  public static File getJavaHome()
  {
    return new File(System.getProperty("java.home"));
  }

  public static File getJavaIoTmpDir()
  {
    return new File(System.getProperty("java.io.tmpdir"));
  }

  public static float getJavaVersion()
  {
    return JAVA_VERSION_FLOAT;
  }

  private static float getJavaVersionAsFloat()
  {
    if (JAVA_VERSION_TRIMMED == null)
      return 0.0F;
    String str = JAVA_VERSION_TRIMMED.substring(0, 3);
    if (JAVA_VERSION_TRIMMED.length() >= 5)
      str = str + JAVA_VERSION_TRIMMED.substring(4, 5);
    return Float.parseFloat(str);
  }

  private static int getJavaVersionAsInt()
  {
    if (JAVA_VERSION_TRIMMED == null)
      return 0;
    String str1 = JAVA_VERSION_TRIMMED.substring(0, 1) + JAVA_VERSION_TRIMMED.substring(2, 3);
    if (JAVA_VERSION_TRIMMED.length() >= 5);
    for (String str2 = str1 + JAVA_VERSION_TRIMMED.substring(4, 5); ; str2 = str1 + "0")
      return Integer.parseInt(str2);
  }

  private static boolean getJavaVersionMatches(String paramString)
  {
    if (JAVA_VERSION_TRIMMED == null)
      return false;
    return JAVA_VERSION_TRIMMED.startsWith(paramString);
  }

  private static String getJavaVersionTrimmed()
  {
    if (JAVA_VERSION != null);
    for (int i = 0; ; i++)
    {
      if (i >= JAVA_VERSION.length())
        return null;
      int j = JAVA_VERSION.charAt(i);
      if ((j >= 48) && (j <= 57))
        return JAVA_VERSION.substring(i);
    }
  }

  private static boolean getOSMatches(String paramString)
  {
    if (OS_NAME == null)
      return false;
    return OS_NAME.startsWith(paramString);
  }

  private static boolean getOSMatches(String paramString1, String paramString2)
  {
    if ((OS_NAME == null) || (OS_VERSION == null));
    while ((!OS_NAME.startsWith(paramString1)) || (!OS_VERSION.startsWith(paramString2)))
      return false;
    return true;
  }

  private static String getSystemProperty(String paramString)
  {
    try
    {
      String str = System.getProperty(paramString);
      return str;
    }
    catch (SecurityException localSecurityException)
    {
      System.err.println("Caught a SecurityException reading the system property '" + paramString + "'; the SystemUtils property value will default to null.");
    }
    return null;
  }

  public static File getUserDir()
  {
    return new File(System.getProperty("user.dir"));
  }

  public static File getUserHome()
  {
    return new File(System.getProperty("user.home"));
  }

  public static boolean isJavaAwtHeadless()
  {
    if (JAVA_AWT_HEADLESS != null)
      return JAVA_AWT_HEADLESS.equals(Boolean.TRUE.toString());
    return false;
  }

  public static boolean isJavaVersionAtLeast(float paramFloat)
  {
    return JAVA_VERSION_FLOAT >= paramFloat;
  }

  public static boolean isJavaVersionAtLeast(int paramInt)
  {
    return JAVA_VERSION_INT >= paramInt;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.itrus.util.SystemUtils
 * JD-Core Version:    0.6.2
 */